package com.example.dps;

import android.app.Activity;
import android.database.Cursor;
import android.os.Bundle;
import android.support.v4.widget.SimpleCursorAdapter;


public class SelectAccountActivity extends Activity {
	
	AccountDBHelper accountDBHelper;

	// This is the Adapter being used to display the list's data
	SimpleCursorAdapter mAdapter;
	
	// These are the Contacts rows that we will retrieve
	static final String[] PROJECTION = new String[] {};
	
	// This is the select criteria
	static final String SELECTION = "";
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.account_picker_dialog);
		
		accountDBHelper = new AccountDBHelper(this);
		
		Cursor cursor = null;
		
		cursor = accountDBHelper.getAccountsAsCursor();
		
		
		String[] fromColumns = {accountDBHelper.COLUMN_ACCOUNT_NAME};
		int[] toViews = { R.id.account_list_item_text};
		
		SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, 
		        R.layout.account_list_item, cursor, fromColumns, toViews, 0);
		
//		ListView listView = (ListView) findViewById(R.id.account_list);
//		listView.setAdapter(adapter);
	
	}
}